package Sequence::Infinite::Interval;
use base 'Sequence::Infinite';

sub new {
    my( $class, $sequence, $step, $opt_shift ) = @_;
    my $this = $class->SUPER::new();
    $this->{sequence} = $sequence;
    $this->{step} = $step;
    
    $this->{sequence}->increment for 1..$opt_shift||0;
    
    $this;
}

sub increment {
    my( $this ) = @_;
    my $val = $this->{sequence}->increment;
    $this->{sequence}->increment for 2..$this->{step};
    $val;
}

1;
